[Ubuntu 16.04]安装
参考:Visual Studio Code on Linux
系统要求
参考:Requirements for Visual Studio Code
对于Ubuntu
系统而言,版本要大于等于14.04
还有一个就是
GLIBCXX version 3.4.15 or later
GLIBC version 2.15 or later
安装
有多种安装方式,使用最简单的一种
-
安装
安装方式一:
sudo apt install ./<file>.deb
安装方式二:
# If you're on an older Linux distribution, you will need to run this instead:
sudo dpkg -i <file>.deb
sudo apt-get install -f # Install dependencies
更新
参考:How to update VS Code on Ubuntu?
如果按照上述方式安装,那么系统包管理器会自动更新VSCode
;也可以再次下载deb
包,然后按照上述方式安装即可。
设置默认编辑器
设置VSCode
为默认编辑器
sudo update-alternatives --set editor /usr/bin/code
结果
zhujian@zhujian-virtual-machine:~$ sudo update-alternatives --set editor /usr/bin/code
update-alternatives: using /usr/bin/code to provide /usr/bin/editor (editor) in manual mode